package cn.btks.commonserver.valid.impl;

import cn.btks.commonserver.valid.DoubleValid;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * Created by zhangjing on 2019-4-03.
 * false为拦截、true为跳过
 */
public class DoubleValidImpl implements ConstraintValidator<DoubleValid, Double> {

    @Override
    public void initialize(DoubleValid constraintAnnotation) {

    }

    @Override
    public boolean isValid(Double strDouble, ConstraintValidatorContext constraintValidatorContext) {
        if (-9527.138 == strDouble)
            return false;
        return true;
    }


}
